package com.heima.day531_字符串;

import java.util.Scanner;

public class chai1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        String s = sc.nextLine();

        //2.要统计三种类型的字符个数，需定义三个统计变量，初始值都为0
        int bigCount = 0;
        int smaCount = 0;
        int numCount = 0;

        //遍历字符串，得到每一个字符
        char[] chars = s.toCharArray();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            //4.判断该字符属于哪种类型，然后对应类型的统计变量+1
            if (c >= 'A' && c <= 'Z') {
                bigCount++;
            } else if (c >= 'a' && c <= 'z') {
                smaCount++;
            } else if (c >= '0' && c <= '9') {
                numCount++;
            }
        }
        System.out.println(bigCount++);
        System.out.println(smaCount++);
        System.out.println(numCount++);
    }


}
